package com.wkbb.common.enums;

/**
 * @author liuxiancan
 */
public enum MiniCodeTemplateTypeEnum {

    /**
     * 代码未上传
     */
    DRAFT(1, "草稿"),
    /**
     * 代码上传失败
     */
    TEMPLATE(2, "模板");

    MiniCodeTemplateTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public int getValue() {
        return this.value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (MiniCodeTemplateTypeEnum roleType : MiniCodeTemplateTypeEnum.values()) {
            if (roleType.getValue() == value) {
                return roleType.getDesc();
            }
        }
        return null;
    }
}